
#include <dev.h>
#include "pci.h"

/* ------------------------------------------------------------------------- */

static pci_dev_t mem_dev;

static void fastcall mem_config(uint8 reg, uint32 data, uint32 mask);
static size_t fastcall mem_map_size(uint map);
static size_t fastcall mem_read_map(uint map, uint32 addr, void *data, size_t size);
static size_t fastcall mem_write_map(uint map, uint32 addr, const void *data, size_t size);

/* ------------------------------------------------------------------------- */

pci_dev_t *get_mem_device(void)
{
	memset(&mem_dev, 0, sizeof(mem_dev));

#ifndef NDEBUG
	strcpy(mem_dev.name, "MEM");
#endif

	mem_dev.config = &mem_config;
	mem_dev.map_size = &mem_map_size;
	mem_dev.read_map = &mem_read_map;
	mem_dev.write_map = &mem_write_map;

	return &mem_dev;
}

/* ------------------------------------------------------------------------- */

static void fastcall mem_config(uint8 reg, uint32 data, uint32 mask)
{

}

static size_t fastcall mem_map_size(uint map)
{
	return 0;
}

static size_t fastcall mem_read_map(uint map, uint32 addr, void *data, size_t size)
{
	return size;
}

static size_t fastcall mem_write_map(uint map, uint32 addr, const void *data, size_t size)
{
	return size;
}

/* ------------------------------------------------------------------------- */
